<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_finance.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.trade.ti_member.*" %>

<html>
  <head>
    
    <title>会员积分调整</title>
	<link href="/program/company/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="inter.js"></script>
</head>

<body>

  <% 
	String user_id = "";
  
   if(session.getAttribute("session_user_id")!=null){
	     user_id  =session.getAttribute("session_user_id").toString();
	}
	
  	String cust_id="";
  	if(request.getParameter("cust_id")!=null) cust_id = request.getParameter("cust_id");
	
	Ti_memberInfo memberInfo = new Ti_memberInfo();
	List cust_list = memberInfo.getListByPk(cust_id);
	
  	Hashtable cust_map = new Hashtable();
  	if(cust_list!=null && cust_list.size()>0) cust_map = (Hashtable)cust_list.get(0);
	String cust_name = "";
	if(cust_map.get("cust_name")!=null){
	cust_name = cust_map.get("cust_name").toString();
	}
	
  	Ti_financeInfo ti_financeInfo = new Ti_financeInfo();
  	List list = ti_financeInfo.getListByPk(cust_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);

  	String vmoney="0",use_vmoney="0",frz_vmoney="0",inter="0",use_inter="0",frz_inter="0",remark="";
  	if(map.get("vmoney")!=null) vmoney = map.get("vmoney").toString();
  	if(map.get("use_vmoney")!=null) use_vmoney = map.get("use_vmoney").toString();
  	if(map.get("frz_vmoney")!=null) frz_vmoney = map.get("frz_vmoney").toString();
  	if(map.get("inter")!=null && !map.get("inter").toString().equals("")) inter = map.get("inter").toString();
  	if(map.get("use_inter")!=null && !map.get("use_inter").toString().equals("")) use_inter = map.get("use_inter").toString();
  	if(map.get("frz_inter")!=null) frz_inter = map.get("frz_inter").toString();
  	if(map.get("remark")!=null) remark = map.get("remark").toString();

  %>
	
	<h1>会员积分调整</h1>
	
	<!--
	<table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>-----------------</h4>
		  <span>1----------------。</span><br/>
		  <span>2----------------。</span>
		  </td>
        </tr>
      </table>
      <br/>
	  -->
	
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtabadd">
	
		<tr>
			<td class="labletd" width="10%">
				会员名称:
			</td>
			<td><%=cust_name%></td>
		</tr>	
	
		<tr>
			<td class="labletd" width="10%">
				可用积分数<span style="color:red;">*</span>
			</td>
			<td><input name="use_inter" id="use_inter" value="<%=use_inter %>" type="text" onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value='';changeNum();" maxlength="10" /></td>
		</tr>	
		<tr>
			<td class="labletd" width="10%">
				积分总数:
			</td>
			<td><input name="inter" id="inter" value="<%=inter%>" type="text"  maxlength="10" readonly="readonly"/></td>
		</tr>	
		<tr>
			<td class="labletd" width="10%">
				冻结积分数:
			</td>
			<td><input name="frz_inter" id="frz_inter" value="<%=frz_inter %>" type="text"  maxlength="10" readonly="readonly"/></td>
		</tr>			

		<tr>
			<td class="labletd" width="10%">
				异动原因<span style="color:red;">*</span>
			</td>
			<td><textarea name="reason" id="reason"  cols="50" rows="10"></textarea></td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="3320" />
				<input type="hidden" name="type" id="type" value="0" />
				<input type="hidden" name="num" id="num" value="0" />
				<input type="hidden" name="old_inter" id="old_inter" value="<%=use_inter %>" />
				<input type="hidden" name="user_id" value="<%=user_id %>" />
	  			<input type="hidden" name="cust_id" value="<%=cust_id %>" />
				<input type="button" class="buttoncss" name="tradeSub" value="提交"  onclick="return submitForm();" />&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
